package org.jeecg.modules.demo.crm.entity;

import java.io.Serializable;
import java.io.UnsupportedEncodingException;
import java.util.Date;
import java.math.BigDecimal;
import java.util.List;

import com.baomidou.mybatisplus.annotation.*;
import lombok.*;
import org.jeecg.common.constant.ProvinceCityArea;
import org.jeecg.common.util.SpringContextUtils;
import com.fasterxml.jackson.annotation.JsonFormat;
import org.springframework.format.annotation.DateTimeFormat;
import org.jeecgframework.poi.excel.annotation.Excel;
import org.jeecg.common.aspect.annotation.Dict;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.experimental.Accessors;

/**
 * @Description: 工程报价单
 * @Author: jeecg-boot
 * @Date:   2025-08-28
 * @Version: V1.0
 */
@Data
@TableName("c_quotation")
@Accessors(chain = true)
@EqualsAndHashCode(callSuper = false)
@ApiModel(value="c_quotation对象", description="工程报价单")
@Builder
@NoArgsConstructor // 自动生成无参构造方法
@AllArgsConstructor // 自动生成全参构造方法
public class CQuotation implements Serializable {
    private static final long serialVersionUID = 1L;

	/**主键*/
	@TableId(type = IdType.ASSIGN_ID)
    @ApiModelProperty(value = "主键")
    private String id;
	/**创建人*/
    @ApiModelProperty(value = "创建人")
    private String createBy;
	/**创建日期*/
	@JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss")
    @DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
    @ApiModelProperty(value = "创建日期")
    private Date createTime;
	/**更新人*/
    @ApiModelProperty(value = "更新人")
    private String updateBy;
	/**更新日期*/
	@JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss")
    @DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
    @ApiModelProperty(value = "更新日期")
    private Date updateTime;
	/**报价名称*/
	@Excel(name = "报价名称", width = 15)
    @ApiModelProperty(value = "报价名称")
    private String name;
	/**需求id*/
	@Excel(name = "需求id", width = 15, dictTable = "c_additional_request", dicText = "title", dicCode = "id")
	@Dict(dictTable = "c_additional_request", dicText = "title", dicCode = "id")
    @ApiModelProperty(value = "需求id")
    private String additionalId;
	/**项目id*/
	@Excel(name = "项目id", width = 15, dictTable = "c_project_application", dicText = "project_name", dicCode = "id")
	@Dict(dictTable = "c_project_application", dicText = "project_name", dicCode = "id")
    @ApiModelProperty(value = "项目id")
    private String projectId;
	/**子项目id*/
	@Excel(name = "子项目id", width = 15, dictTable = "c_sub_project", dicText = "sub_project_name", dicCode = "id")
	@Dict(dictTable = "c_sub_project", dicText = "sub_project_name", dicCode = "id")
    @ApiModelProperty(value = "子项目id")
    private String subProjectId;
	/**项目编号*/
	@Excel(name = "项目编号", width = 15)
    @ApiModelProperty(value = "项目编号")
    private String projectNumber;
	/**备注*/
	@Excel(name = "备注", width = 15)
    @ApiModelProperty(value = "备注")
    private String remark;
	/**甲方*/
	@Excel(name = "甲方", width = 15)
    @ApiModelProperty(value = "甲方")
    private String partyA;
	/**乙方*/
	@Excel(name = "乙方", width = 15)
    @ApiModelProperty(value = "乙方")
    private String partyB;
	/**甲方时间*/
	@Excel(name = "甲方时间", width = 15, format = "yyyy-MM-dd")
	@JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd")
    @DateTimeFormat(pattern="yyyy-MM-dd")
    @ApiModelProperty(value = "甲方时间")
    private Date partyADate;
	/**乙方时间*/
	@Excel(name = "乙方时间", width = 15, format = "yyyy-MM-dd")
	@JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd")
    @DateTimeFormat(pattern="yyyy-MM-dd")
    @ApiModelProperty(value = "乙方时间")
    private Date partyBDate;

    /**
     * 项目详情
     */
    @TableField(exist = false)
    @ApiModelProperty(value = "临时数据字段，不存储到数据库")
    private List<CQuotationInfo> details;

    @TableField(exist = false)
    @ApiModelProperty(value = "临时数据字段，不存储到数据库")
    private Integer mailCount;

    /**管理库*/
    @TableField(exist = false)
    @Excel(name = "管理库", width = 15, dictTable = "c_library", dicText = "name", dicCode = "id")
    @Dict(dictTable = "c_library", dicText = "name", dicCode = "id")
    @ApiModelProperty(value = "管理库")
    private String libraryId;

    @TableField(exist = false)
    @ApiModelProperty(value = "临时数据字段，不存储到数据库")
    private Boolean isStorage;



}
